package com.edol.painting.painting;


import android.util.Log;

public class Particle {

    public float x;
    public float y;
    public float width;
    public int alpha;
    public float angle;

    public Particle() {
    }

    public Particle(float px, float py, float pangle) {
        x = px;
        y = py;
        angle = pangle;
    }

    public static Particle getMidPoint(Particle p0, Particle p1) {
        Particle particle = new Particle();
        particle.x = (p0.x + p1.x) / 2;
        particle.y = (p0.y + p1.y) / 2;
        particle.width = (p0.width + p1.width) / 2;
        particle.alpha = (p0.alpha + p1.alpha) / 2;
        particle.angle = (p0.angle + p1.angle) / 2;
        return particle;
    }

    @Override
    public String toString() {
        return "Particle{" +
                "x=" + x +
                ", y=" + y +
                ", width=" + width +
                ", alpha=" + alpha +
                ", angle=" + angle +
                '}';
    }
}
